The present invention supports the retrieval of information maintained in a computer database, such as the registry of a computer system. Specifically, the present invention provides an interface for retrieving information from a registry for one or more program modules operating on a computer system.
Software applications utilize many resources of a computer system to aid them in performing their functions. These resources can include libraries and routines that assist the operation of an application by performing functions that the application would otherwise have to perform itself. Other resources include an operating system, which can control the application""s interaction with the computer system, and a registry. The registry is a central repository for a computer system. An application can store and retrieve information in the registry for access during the next session of the application.
The information maintained by the registry can become difficult to manage as a result of an increase in the number of program modules, such as application programs, which use the resources of a computer system. For example, registry information has grown in size and complexity in response to an increased use of computer resources by multiple program modules of the computer system. Representative examples of problems arising from the use of prior registry-implemented storage systems are described below to illustrate the need for an improved mechanism for accessing and retrieving registry information.
One registry problem is the fragmentation of registry information. For example, information about use of a registry is typically contained within the application""s source code. Managing registry information on a high level has been difficult because moving data in the registry often required a direct change of this source code. Additionally, finding registry information in the source code by a developer has been difficult because this information is located in each instance that the application requests registry data.
Another registry problem is the universal implementation of registry features. For example, sometimes a registry feature should be implemented across all registry calls. If a system administrator inserts an environment variable into a registry value, it is expected that an end value will properly interpret the environment variable. Today, however, this requires that all registry calls add an additional check and a new code section. Because this modification can represent a major code change when thousands of registry calls are involved, only certain registry calls typically include this feature.
A third registry problem is the efficient implementation of administrator policy. Administrators typically use scripts to impose policy settings on users. If an administrator desires to impose policy settings on a permanent basis, then the entire user registry is locked down to read-only permissions. When the entire registry is locked down, however, a user""s individual settings does not persist from session to session.
And y Yet another registry problem is the administration of an increased data set by the registry. Because registry data is written to the registry at during an application""s setup, the registry is typically filled with many values that never change. If some of the keys for those values are deleted, however, the application cannot run on the computer system. Because tracking key and value usage is difficult, some values may become obsolete or unnecessaryold, and are no longer needed over time. This results in the creation of registry xe2x80x9cbloat.xe2x80x9d A determination of the values written by a set-up program or the values changed by a user is also difficult in the absence of an effective administration system for the registry.
And fStill another registry problem is the inefficient use of registry information by an application. Because registry information is typically scattered throughout the source code of an application, constant string data, such as registry key names, are often duplicated. One section of code can duplicate a significant number of characters when referencing a key name for a registry value. For thousands of registry entries, the performance of an application can be reduced by such duplicate code sections.
In view of the problems with prior registry operations, there is a need in the art for an improved mechanism for managing the registry. This improved registry management system would reduce fragmentation and support the consistent universal implementation of features and Administrator policy settings. This improved registry management system also would reduce registry bloat, while increasing the performance of an application that accesses the registry.
The present invention satisfies the above needs by providing a method for managing the retrieval of information maintained by a registry. The present invention can support the consistent universal implementation of features and Administrator policy settings, reduce registry bloat, and increase application performance, while reducing fragmentation. The present invention provides a registry interface database and a registry application program interface (API) for the efficient administration of registry operations.
The registry database can contain information regarding registry data and uniquely identifies each registry entry that will be utilized by the registry interface. Following the creation of this database, source header files are generated using information about a program module, such as an application, contained in the registry interface database. The source header files are compiled with the application to generate the application""s executable file. The application""s executable file can contain calls to the registry interface instead of direct calls to the operating system to access the registry. During run-time of the application, the registry interface is called to retrieve registry data. In the event that the registry data is not available, the registry interface can retrieve a default value in place of the registry data.
One aspect of the present invention provides a policy section of the registry. When a request for registry data is received by the registry interface, the policy section of the registry is checked first, and iIf the policy data exists, then policy is invoked. If the data is does not found in the policy area, then the non-policy area of the registry is checked and the data, if it exists, is returned.
Another aspect of the present invention includes caching registry keys and building a key using tables containing relationships between key elements. This enables a single placement of key names and related data within the source code of an application, thereby avoiding multiple instances of constant data within the application.
Advantageously, the present invention allows for the consolidation of registry use, and the integrationing of registry design, and management and practice into one process that revolves around a central database and a registry interface. This can reduce registry bloat, streamline the application code, speeds up registry calls and eliminate duplicate constant information. In addition, the present invention can support the universal implementation of Administrator policy. These advantages, as well as other objectives recognizable by one of ordinary skill in the art, can be understood by a review of the detailed description, the appended drawings, and the claims.